<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>GridDB RPM Install Guide</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2016-09-28 17:29:40 "/>
<meta name="author" content=""/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Helvetica; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: Courier New, Courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  del { color: gray; }
  /*]]>*/-->
    </style>
<STYLE type="text/css">
<!-
.break { page-break-before: always; }
-->
</STYLE>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">

<h1 class="title">GridDB RPM Install Guide</h1>




<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Installating and Setting Up GridDB with RPM </a>
<ul>
<li><a href="#sec-1.1">1.1 Confirming the Environment </a></li>
<li><a href="#sec-1.2">1.2 Confirming Packages </a></li>
<li><a href="#sec-1.3">1.3 Installing RPM package </a></li>
<li><a href="#sec-1.4">1.4 Confirmation After Installation </a></li>
<li><a href="#sec-1.5">1.5 Setting up an administrator user (Mandatory) </a></li>
<li><a href="#sec-1.6">1.6 Editing Definition Files </a></li>
<li><a href="#sec-1.7">1.7 Setting Up Libraries </a></li>
<li><a href="#sec-1.8">1.8 Setting Up a Client </a></li>
<li><a href="#sec-1.9">1.9 Uninstalling GridDB </a></li>
</ul>
</li>
<li><a href="#sec-2">2 Trademark </a></li>
</ul>
</div>
</div>




<DIV class="break"></DIV><BR>


<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Installating and Setting Up GridDB with RPM </h2>
<div class="outline-text-2" id="text-1">


<p>
This section shows how to install GridDB on a single machine.
</p>

</div>

<div id="outline-container-1.1" class="outline-3">
<h3 id="sec-1.1"><span class="section-number-3">1.1</span> Confirming the Environment </h3>
<div class="outline-text-3" id="text-1.1">


<p>
Confirm that OS is CentOS 6.X or 7.X.
</p>



<pre class="example">$ lsb_release -id
Distributor ID: CentOS
Description:    CentOS release 6.7 (Final)
</pre>




<p>
<b>[Note]</b>
</p><ul>
<li>
Select the following option at the minimum for Package Group Selection while installing OS.
<ul>
<li>
Software Development WorkStation

</li>
</ul>
</li>
</ul>

<p>Make sure that the following is installed as a Java development environment.
</p>
<ul>
<li>
Java JDK1.6 or later


</li>
</ul>


<pre class="example">$ java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
</pre>




</div>

</div>

<div id="outline-container-1.2" class="outline-3">
<h3 id="sec-1.2"><span class="section-number-3">1.2</span> Confirming Packages </h3>
<div class="outline-text-3" id="text-1.2">


<p>
The following package is used to install a GridDB node, Java client, and commands.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<caption></caption>
<colgroup><col align="left" /><col align="left" /><col align="left" />
</colgroup>
<thead>
<tr><th scope="col">Package name</th><th scope="col">File name</th><th scope="col">Content</th></tr>
</thead>
<tbody>
<tr><td>griddb_nosql</td><td>griddb_nosql-X.X.X-linux.x86_64.rpm</td><td>Contains GridDB's node module, Java client, commands, etc.</td></tr>
</tbody>
</table>


<p>
*: X.X.X is the GridDB version 
</p>
<p>
First, make sure that you have all the necessary RPM packages.
Confirm the following files:
</p>



<pre class="example">$ ls
griddb_nosql-X.X.X-linux.x86_64.rpm
</pre>





</div>

</div>

<div id="outline-container-1.3" class="outline-3">
<h3 id="sec-1.3"><span class="section-number-3">1.3</span> Installing RPM package </h3>
<div class="outline-text-3" id="text-1.3">


<p>
Switch to the root user and install the necessary RPM packages by the "rpm" command, as shown below.
</p>



<pre class="example">$ su
# rpm -ivh griddb_nosql-X.X.X-linux.x86_64.rpm
Preparing...                ########################################### [100%]

------------------------------------------------------------
Information:
  User gsadm and group gridstore have been registered.
  GridDB uses new user and group.
------------------------------------------------------------

   1:griddb_nosql           ########################################### [100%]
</pre>




<p>
After installing GridDB's node module, the following user and group are created.
Use the user and group for running a node module and operational commands.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<caption></caption>
<colgroup><col align="left" /><col align="left" /><col align="left" />
</colgroup>
<thead>
<tr><th scope="col">Group</th><th scope="col">User</th><th scope="col">Home directory</th></tr>
</thead>
<tbody>
<tr><td>gridstore</td><td>gsadm</td><td>/var/lib/gridstore</td></tr>
</tbody>
</table>


<p>
<b>[NOTE]</b>
</p><ul>
<li>
The password of the user "gsadm" has not been set. Please set the password by using OS command.

</li>
</ul>

<p>For the user "gsadm," two environment variables are defined as below.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<caption></caption>
<colgroup><col align="left" /><col align="left" /><col align="left" />
</colgroup>
<thead>
<tr><th scope="col">Environment variable</th><th scope="col">Value</th><th scope="col">Meaning</th></tr>
</thead>
<tbody>
<tr><td>GS_HOME</td><td>/var/lib/gridstore</td><td>gsadm/GridDB home directory</td></tr>
<tr><td>GS_LOG</td><td>/var/lib/gridstore/log</td><td>Event log file output directory</td></tr>
</tbody>
</table>


<p>
<b>[Note]</b>
</p><ul>
<li>
These environment variables are referenced by the operational commands. If you execute those commands as other than this user, you need to define the environment variables as above.


</li>
</ul>
</div>

</div>

<div id="outline-container-1.4" class="outline-3">
<h3 id="sec-1.4"><span class="section-number-3">1.4</span> Confirmation After Installation </h3>
<div class="outline-text-3" id="text-1.4">


<p>
Confirm the directory structure of the installed GridDB node.
If installation completed normally, the following directories and files are created as well as necessary modules and commands.
</p>



<pre class="example">/var/lib/gridstore/        # GridDB home directory
     backup/               # Backup directory(unused)
     conf/                 # Directory storing definition files
         gs_cluster.json   # Cluster definition file
         gs_node.json      # Node definition file
         password          # User definition file
     data/                 # Directory storing database files
     log/                  # Directory storing event log files
</pre>




<p>
Below is shown how to use commands for confirmation.
</p>
<p>
First, confirm whether the following files exist.
</p>



<pre class="example">$ ls /usr/griddb-X.X.X/*
/usr/griddb-X.X.X/RPM-README.md

/usr/griddb-X.X.X/3rd_party:
3rd_party.md            apr              json-simple      picojson  slf4j
activemq-cpp-library    BSD_License.txt  MessagePack      purewell  yield
Apache_License-2.0.txt  ebb              MIT_License.txt  sha2

/usr/griddb-X.X.X/bin:
gridstore-X.X.X.jar       gs_joincluster   gs_startnode    log.py
gridstore-conf-X.X.X.jar  gs_leavecluster  gs_stat         util.py
gs_adduser                gs_passwd        gs_stopcluster
gs_deluser                gsserver         gs_stopnode

/usr/griddb-X.X.X/conf:
gs_cluster.json  gs_node.json  password

/usr/griddb-X.X.X/docs:
manual  sample
</pre>




<p>
Similarly, confirm whether the following files and directories exist.
</p>



<pre class="example">$ ls /var/lib/gridstore/*
/var/lib/gridstore/backup:

/var/lib/gridstore/conf:
gs_cluster.json  gs_node.json  password

/var/lib/gridstore/data:

/var/lib/gridstore/log:
</pre>




<p>
Confirm the directory structure of the installed GridDB client libraries.
If installation completed normally, the following files are created.
</p>



<pre class="example">$ ls -l /usr/share/java/*gridstore*
lrwxrwxrwx 1 gsadm gridstore 46 Apr 11 20:43 /usr/share/java/gridstore-conf.jar -&gt; /usr/griddb-X.X.X/bin/gridstore-conf-X.X.X.jar
lrwxrwxrwx 1 gsadm gridstore 41 Apr 11 20:43 /usr/share/java/gridstore.jar -&gt; /usr/griddb-X.X.X/bin/gridstore-X.X.X.jar
</pre>




<p>
If you start a GridDB node and then access and run the node from a client, the following files are created in the directories to store database files and event log files.
</p>
<p>
[Database file]
</p>


<pre class="example">/var/lib/gridstore/        # GridDB home directory
     data/                 # Directory storing database files
         gs_log_n_m.log    # File recording transaction logs (n, m: positive number)
         gs_cp_n_p.dat     # Checkpoint file recording data regularly (n, p: positive number)
</pre>




<p>
[Event log file]
</p>


<pre class="example">/var/lib/gridstore/              # GridDB home directory
     log/                        # Directory storing event logs
         gridstore-%Y%m%d-n.log  # Event log file
</pre>




<p>
You can change the directories to store files by editing the relevant parameters in the node definition file.
</p>
</div>

</div>

<div id="outline-container-1.5" class="outline-3">
<h3 id="sec-1.5"><a name="setup_admin" id="setup_admin"></a><span class="section-number-3">1.5</span> Setting up an administrator user (Mandatory) </h3>
<div class="outline-text-3" id="text-1.5">


<p>
An administrator user is used for authentication purposes in nodes and clusters. Administrator user information is stored in the 
<b>User definition file</b>. The default file is as shown below.
</p><ul>
<li>
$GS_HOME/conf/password

</li>
</ul>

<p>The following default users exist just after installation.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<caption></caption>
<colgroup><col align="left" /><col align="left" />
</colgroup>
<thead>
<tr><th scope="col">User</th><th scope="col">Password</th></tr>
</thead>
<tbody>
<tr><td>admin</td><td>No settings</td></tr>
</tbody>
</table>


<p>
Administrator user information including the above-mentioned default users can be changed using the user administration command in the operating commands.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<caption></caption>
<colgroup><col align="left" /><col align="left" />
</colgroup>
<thead>
<tr><th scope="col">Command</th><th scope="col">Function</th></tr>
</thead>
<tbody>
<tr><td>gs_adduser</td><td>Add an administrator user</td></tr>
<tr><td>gs_deluser</td><td>Delete an administrator user</td></tr>
<tr><td>gs_passwd</td><td>Change the password of an administrator user</td></tr>
</tbody>
</table>


<p>
Change the password as shown below when using a default user.
The password is encrypted during registration.
</p>
<p>
<b>[Note]</b>
</p><ul>
<li>
<span style="text-decoration:underline;">Default user password has not been set. Be sure to change the password as the server will not start if the administrator user password is not set.</span>


</li>
</ul>


<pre class="example">$ gs_passwd admin
Password:（Input password）
Retype password:（Input password again）
</pre>




<p>
<span style="text-decoration:underline;">When adding a new administrator user except a default user, the user name has to start with gs#.</span>
</p>
<p>
One or more ASCII alphanumeric characters and the underscore sign “_” can be used after gs#.
</p>
<p>
An example on adding a new administrator user is shown below.
</p>



<pre class="example">$ gs_adduser gs#newuser
Password:（Input password）
Retype password:（Input password again）
</pre>




<p>
<b>[Note]</b>
</p><ul>
<li>
<span style="text-decoration:underline;">A change in the administrator user information using a user administration command becomes valid when a node is restarted.</span>
</li>
<li>
User information is used for client authentication, <span style="text-decoration:underline;">so the common user information must be registered in all nodes</span>. Make sure that the common user information is referred to by all nodes, by copying the user definition file.

</li>
</ul>
</div>

</div>

<div id="outline-container-1.6" class="outline-3">
<h3 id="sec-1.6"><span class="section-number-3">1.6</span> Editing Definition Files </h3>
<div class="outline-text-3" id="text-1.6">


<p>
There are two kinds of definition files for GridDB:
</p>
<ul>
<li>
Cluster definition file
</li>
<li>
Node definition file

</li>
</ul>

<p>The cluster definition file is a file which defines the setting values commonly used in the entire cluster.
The node definition file is a file which defines different setting values for each node.
</p>
<p>
Templates for these definition files are installed as shown below.
You can create definition files for GridDB by copying and editing these templates.
</p>



<pre class="example">/usr/griddb-X.X.X/     # Installation directory
     conf/                # Directory storing definition files
         gs_cluster.json  # Template for cluster definition file
         gs_node.json     # Template for node definition file
</pre>




<p>
Save an edited file with the predetermined name in the predetermined directory shown below.
</p>



<pre class="example">/var/lib/gridstore/       # GridDB home directory
     conf/                # Directory storing definition files
         gs_cluster.json  # (Edited) Cluster definition file
         gs_node.json     # (Edited) Node definition file
</pre>




<p>
For details on definition files, refer to "2.3 Configure environment-dependent parameters." of "Quick Start Guide" (GridDB_QuickStartGuide.html)
</p>
</div>

</div>

<div id="outline-container-1.7" class="outline-3">
<h3 id="sec-1.7"><span class="section-number-3">1.7</span> Setting Up Libraries </h3>
<div class="outline-text-3" id="text-1.7">


<p>
If you use a Java-based client, add the client library path to CLASSPATH.
</p>



<pre class="example">$ export CLASSPATH=${CLASSPATH}:/usr/share/java/gridstore.jar
</pre>




</div>

</div>

<div id="outline-container-1.8" class="outline-3">
<h3 id="sec-1.8"><span class="section-number-3">1.8</span> Setting Up a Client </h3>
<div class="outline-text-3" id="text-1.8">


<p>
There is no definition file for setting up a client.
Specify the connection point and user/password in the client program.
</p>
<p>
For details on the NoSQL specifications, refer to "GridDB API Reference" (GridDB_API_Reference.html)
</p>
</div>

</div>

<div id="outline-container-1.9" class="outline-3">
<h3 id="sec-1.9"><span class="section-number-3">1.9</span> Uninstalling GridDB </h3>
<div class="outline-text-3" id="text-1.9">


<p>
If GridDB is no longer necessary, uninstall all the packages.
Follow the uninstallation procedure shown below:
</p>



<pre class="example">$ su
# rpm -e griddb_nosql
</pre>




</div>
</div>

</div>

<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Trademark </h2>
<div class="outline-text-2" id="text-2">


<ul>
<li>
GridDB is a trademark of Toshiba Digital Solutions Corporation.
</li>
<li>
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
</li>
<li>
Linux is a trademark of Linus Torvalds.
</li>
<li>
Other product names are trademarks or registered trademarks of the respective owners.


<p>
Copyright (C) 2017 TOSHIBA Digital Solutions Corporation
</p></li>
</ul>
</div>
</div>
<div id="postamble">
</div>
</div>
</body>
</html>
